/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.aptech.sBean;

import com.aptech.entities.TblElevation;
import java.util.List;
import javax.ejb.Stateless;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;
import javax.persistence.Query;

/**
 *
 * @author Winner
 */
@Stateless
public class TblElevationFacade extends AbstractFacade<TblElevation> {

    @PersistenceContext(unitName = "Elevation_System_Online-ejbPU")
    private EntityManager em;

    @Override
    protected EntityManager getEntityManager() {
        return em;
    }

    public TblElevationFacade() {
        super(TblElevation.class);
    }
    public List<TblElevation> getTblElevationToOrder(int elID){
        Query query = em.createNamedQuery("TblElevation.findByElID");
        query.setParameter("elID", elID);
        return query.getResultList();  
    }
    public List<TblElevation> getTblElevationByEtID(int etID){
        Query query=em.createNamedQuery("TblElevation.findByEtID");
        query.setParameter("etID", etID);
        return query.getResultList();
    }
}
